package net.yunzhanyi.generic.mapper;

import net.yunzhanyi.generic.domain.model.ClientPost;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author bestct
 */
@Mapper
public interface ClientPostMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ClientPost record);

    int insertSelective(ClientPost record);

    ClientPost selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ClientPost record);

    int updateByPrimaryKey(ClientPost record);

    List<ClientPost> selectByNewType(@Param("postType") Integer postType);

    List<ClientPost> selectByEssType(Integer postType);

    void increaseUpvote(long postId);

    void decreaseUpvote(long postId);

    void increasePageviews(Long postId);

    void decreaseCollocation(Long postId);

    void increaseCollocation(Long postId);
}